import request from '@/utils/request'
import type { ApiResponse } from '@/types/api'



// 商品分类详情
export interface CategoryDetail {
  category: string
  count: string
}

// 商品统计数据
export interface StatsData {
  total: string
  detail: CategoryDetail[]
  status: string
}

// 用户增长统计数据
export interface UserGrowthData {
  total: string
  detail: {
    dates: string[]
    counts: string[]
  }
  status: string
}



// 获取商品统计数据
export const getItemStats = () => {
  return request.get<StatsData>('/stats/item')
}

// 获取用户增长统计数据
export const getUserGrowthStats = () => {
  return request.get<UserGrowthData>('/stats/user/growth')
} 